package com.jinyi.wwdeng.autodialer.data

/**
 * 数据模型
 */
data class CallTask (
    var id: Long = 0,
    val phoneNumber: String,//号码
    var status: CallStatus  = CallStatus.DIAL_DIALING, // 0: 待拨打, 1: 拨打中, 2: 待上传, 3: 上传中 4: 上传成功 5: 上传失败  6: 成功  -1: 失败
    var createTime: Long = System.currentTimeMillis(),//创建时间
    var callStartTime: Long = 0,//开始拨打时间
    var callEndTime: Long = 0,//挂断时间
    var localAudioPath: String? = null,//录音文件本地路径
    var serverAudioPath: String? = null,//录音文件服务器路径
    var uploadRetryCount: Int = 0,//文件上传重试次数
    var reportRetryCount: Int = 0,//保存数据上报重试次数
    var errorMessage: String? = null,//错误信息
    var product: String? = null,
    var orderId: String? = null,
    var mobileType: String? = null,
    var userId: String? = null,
    var callLog: String? = null
) {
    enum class CallStatus {
        DIAL_PENDING,    //待拨打
        DIAL_DIALING,    //拨打中
        UPLOAD_PENDING,  //待上传
        UPLOADING,       //上传中
        UPLOAD_SUCCESS, //上传成功
        UPLOAD_FAILED,   //上传失败
        COMPLETED,    //成功
        DIAL_FAILED     //失败
    }
}